<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<!-- <meta name="viewport" content="width=device-width, initial-scale=1"> -->
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover" />
		<title>广告启动页</title>
		<link rel="stylesheet" href="../css/advertise.css">
		<!-- uni 的 SDK -->
		<script type="text/javascript" src="../js/webView.js"></script>
	</head>
	<body>
		<div class="content">
			<div class="con">
				<img id="img" src="">
			</div>
			<div class="btn" id="timer">
				<div id="info">Saltar</div>
				<div class="circleProgress_wrapper btn">
					<div class="wrapper right">
						<div class="circleProgress rightcircle"></div>
					</div>
					<div class="wrapper left">
						<div class="circleProgress leftcircle"></div>
					</div>
				</div>
			</div>
		</div>
	</body>
	<script>
		var urlData;
		document.addEventListener('UniAppJSBridgeReady', function() {
			urlData = JSON.parse(GetQueryString("urlData"))
			document.getElementById("info").innerHTML = urlData.buttonText;
			document.getElementById("img").src=urlData.gif;
			document.querySelector('.btn').addEventListener('click', function(e) {
				if (e.isTrusted) {
					plus.webview.currentWebview().close();
				}
			});
		});
		
		function GetQueryString(name) {
			var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
			var r = window.location.search.substr(1).match(reg);
			if (r != null) return decodeURIComponent(r[2]);
			return null;
		}
	</script>
</html>
